#include "StdAfx.h"
#include "wtennis.h"
#include "btime.h"		//for port info
#include "machine/WorldTennisMachine.h"

static dip_t dip1[] =
	{
	{"Coin 1",2,3,{{"2 coins/1 credit",0},{"1 coin/3 credits",1},{"1 coin/2 credits",2},{"1 coin/1 credit",3}}},
	{"Coin 2",2,0xC,{{"2 coins/1 credit",0},{"1 coin/3 credits",4},{"1 coin/2 credits",8},{"1 coin/1 credit",0xC}}},
	{"Unknown",1,0,{{"off",0},{"on",0x10}}},
	{"Unknown",1,0,{{"off",0},{"on",0x20}}},
	{"Cabinet type",1,0,{{"upright",0},{"cocktail",0x40}}},
	{"VBlank",-1,0,{{"off",0},{"on",0x80}}},
	{0,0,0,0,0}	
	};

static dip_t dip2[] =
	{
	{"Lives",1,1,{{"3",0},{"2",1}}},
	{"Bonus life",2,6,{{"none",0},{"30,000",2},{"20,000",4},{"10,000",6}}},
	{"Unknown",1,0,{{"off",0},{"on",8}}},
	{"Unknown",1,0,{{"off",0},{"on",0x10}}},
	{"Unknown",1,0,{{"off",0},{"on",0x20}}},
	{"Unknown",1,0,{{"off",0},{"on",0x40}}},
	{"Unknown",1,0,{{"off",0},{"on",0x80}}},
	{0,0,0,0,0}	
	};

Cwtennis::Cwtennis()
{
SetName("wtennis");						//set romset name
SetScreen(256,256,ROTATE_270);
SetDip(0,dip1);
SetDip(1,dip2);
SetPort(0,&btimePort1);
SetPort(1,&btimePort2);
SetPort(2,&btimePort3);
AddROM("tx",	0xC000,0x0800,0xfd343474,ROM_CPU1);
AddROM("t4",	0xD000,0x1000,0xe465d82c,ROM_CPU1);
AddROM("t3",	0xE000,0x1000,0x8f090eab,ROM_CPU1);
AddROM("t2",	0xF000,0x1000,0xd2f9dd30,ROM_CPU1);
AddROM("t1",	0x0000,0x1000,0x40737ea7,ROM_CPU2);
AddROM("t7",	0x0000,0x1000,0xaa935169,ROM_VROM1);
AddROM("t10",	0x1000,0x1000,0x746be927,ROM_VROM1);
AddROM("t6",	0x2000,0x1000,0x4fb8565d,ROM_VROM1);
AddROM("t9",	0x3000,0x1000,0x4893286d,ROM_VROM1);
AddROM("t5",	0x4000,0x1000,0xea1efa5d,ROM_VROM1);
AddROM("t8",	0x5000,0x1000,0x542ace7b,ROM_VROM1);
AddROM("mb7051.m5",	0x0000,0x0020,0xf051cb28,ROM_PROM);
AddROM("sb-4c",		0x0020,0x0020,0xa29b4204,ROM_PROM);
}

CMachine *Cwtennis::CreateMachine()
{
return(new CWorldTennisMachine());
}
